
import { _decorator, Component, Node, SkeletalAnimationComponent, SkeletalAnimation, Animation, loader } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Typescript')
export class Typescript extends Component {
    // [1]
    // dummy = '';

    // [2]
    // @property
    // serializableDummy = 0;

    @property({type: SkeletalAnimationComponent})
     CocosAnim1 = new SkeletalAnimationComponent();
    
    @property({type: SkeletalAnimationComponent})
     CocosAnim2 = new SkeletalAnimationComponent();
    

@property({type: SkeletalAnimationComponent})
     CocosAnim3 = new SkeletalAnimationComponent();

    start (): void {
        // [3]

        // let animation = this.getComponent(SkeletalAnimation);
        // animation.play('mixamo.com');
        
        this.CocosAnim1.play("macarena");

        this.CocosAnim2.play("mixamo.com");

        this.CocosAnim3.play("Take 001");

        // loader.loadRes("rumba", function (err, sound) {
        //     audioEngine.playMusic(sound, true);
        // });
    }

    // update (deltaTime: number) {
    //     // [4]
    // }
}

/**
 * [1] Class member could be defined like this.
 * [2] Use `property` decorator if your want the member to be serializable.
 * [3] Your initialization goes here.
 * [4] Your update function goes here.
 *
 * Learn more about scripting: https://docs.cocos.com/creator/3.0/manual/en/scripting/
 * Learn more about CCClass: https://docs.cocos.com/creator/3.0/manual/en/scripting/ccclass.html
 * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.0/manual/en/scripting/life-cycle-callbacks.html
 */
